package com.example.debugproject;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //设置MainActivity显示视图 ，这里用布局文件activity_main
        setContentView(R.layout.activity_main);
        //获取到日志调试按钮的实例
        Button log_bt = findViewById(R.id.log_bt);
        //获取到debug调试按钮的实例
        Button debug_bt = findViewById(R.id.debug_bt);
        //日志调试按钮点击监听
        log_bt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //跳转到LogActivity页面
                Intent intent = new Intent(MainActivity.this,LogActivity.class);
                startActivity(intent);
            }
        });
        debug_bt.setOnClickListener((v)->{
            //跳转到DeBugActivity页面
            Intent intent = new Intent(MainActivity.this, DeBugActivity.class);
            startActivity(intent);
        });
    }
}